<!--header -->
<div app-header left='' center='购买' right='' white='true'></div>
<!--header end-->
<div class="mui-content" style="top: 44px;">
	<div class="buy_proInfo">
		
		<h1>周周赚</h1>
		<div class="YielDrate">
			<div class="YielDrate_l">
				<h1>{{productInfo.benchmark_return_rate*100+productInfo.increase_interest_return_rate*100|jiequ}}<em>%</em></h1>
				<p>预期年化</p>
			</div>
			<!--钱包购买-->
			<div class="YielDrate_r" ng-if="type==2">
				<p>投资期限<em ng-bind="productInfo.product_type_pid=='4'?'灵活存取':productInfo.term+'天'"></em></p>
				<p>剩余可购<em>{{Surplus|jiequ}}元</em></p>
				<p>最高可购<em>{{Surplus|currency:"":0}}元</em></p>
			</div>
			<!--银行卡购买-->
			<div class="YielDrate_r" ng-if="type==1">
				<p style="margin-bottom: 18px;padding-top: 10px;">投资期限<em>{{productInfo.term}}天</em></p>
				<p>剩余可购<em>{{Surplus|jiequ}}元</em></p>
			</div>

		</div>
	</div>

	<!--购买流程-->

	<div class="buyList">
		<div class="register">
			<form class="mui-input-group" id="regedit" name="regeditForm" novalidate style="margin-top: 10px;">

				<div class="mui-input-row" style="padding-top: 10px;height: 66px;">
					<label style="width: 35%;">支付方式</label>
					<div class="mui-pull-right bankInfo">
						<strong ng-if="type==1">{{userBankInfo.bank_name}}(尾号{{userBankInfo.acc_number|limitTo:-4}})</strong>
						<strong ng-if="type==2">钱包</strong>
						<p ng-if="type==1">单笔限额{{userBankInfo.simplet_date_amount}}元，单日{{userBankInfo.max_amount}}万元</p>
						<p ng-if="type==2">可用余额{{userBankInfo.acc_amount|jiequ}}元</p>
					</div>
				</div>

				<div class="mui-input-row line" style="margin-top: 10px;">
					<label>购买金额</label>
					<input type="number" ng-pattern="/^[0-9]*[1-9][0-9]*$/" ng-change="jisuan()" required name="amount" ng-model="amount" />
					<span class="input-text-r" ng-if="type==1">元</span>
					<span class="input-text-r" ng-if="type==2" style="color: #ccc;" ng-click="allThrow()">| <em style="font-size: 14px;color: #0097e2;">余额全投</em></span>
				</div>

				<p id="maximum">
					<span class="mui-pull-left">预期收益：<font id="lucre">0元</font></span>
				</p>

				<div class="mui-input-row line" style="margin-top: 10px;" ng-click="checkDiscount()">
					<a class="mui-navigate-right addInterest" >
						<img src="image/icon/icon_yhj@2x.png" />选择优惠券
						<span class="mui-pull-right" ng-if="!couponInfo" style="color: #d6d6d6;">没有可用优惠券</span>
						<span class="mui-pull-right" ng-if="couponInfo">{{couponInfo}}</span>
					</a>
				</div>

			</form>

			<div class="send">
				<button ng-disabled="regeditForm.amount.$invalid" ng-click="buyNext()" ng-class="{'mui-disabled':regeditForm.amount.$invalid}" type="button" form="regedit" class="mui-btn mui-btn-red mui-btn-block send">下一步</button>
			</div>
		</div>

	</div>

	<!--支付方式-->
	<div class="mui-backdrop animated fadeIn" ng-show="maskShow" style="z-index:999"></div>
	<!--验证码支付-->
	<div class="buyDialogBox" ng-show="codeShow">
		<h1>支付</h1>
		<i class="mui-icon mui-icon-closeempty dialog_close"  id="dialog_code" ></i>
		<h2>{{amount|jiequ}}元</h2>
		<div class="buyPayCode">
             <div class="codeInput">
             	   <input type="text" ng-model="code" placeholder="输入验证码" />
             	   <div><div app-count tracode="000010"></div></div>
             </div>
             <p class="info">验证码已发送到手机{{pre_phone|xing}}</p>
             <div class="send" ng-click="paytwo()">
             	确定
             </div>
		</div>
	</div>
	<!--密码支付-->
	<div class="buyDialogBox" ng-show="pwdShow">
		<h1>支付</h1>
		<i class="mui-icon mui-icon-closeempty dialog_close"  id="dialog_pwd"></i>
		<h2>{{amount|jiequ}}元</h2>
		<div class="buyPayCode">
             <div class="codeInput">
             	   <input type="password" ng-model="pwd" placeholder="请输入交易密码" />
             </div>
             <p class="info mui-pull-right" style="font-size: 13px;color:rgb(0,151,226)">忘记密码?</p>
             <div class="send" ng-click="paytwo()">
             	确定
             </div>
		</div>
	</div>
	
	
	
	

</div>